<?
        require_once '../inc/functions.php';
        $section='Customers';
        $rs = Get($_REQUEST['Customer_id']);
		
function GetAll($Customer_id)
{
        $conn = getConnection();
        $sql = '
                SELECT CM.Customer_id
                FROM Proj_ContactMethods CM
                        Join Proj_Customer L ON CM.Customer_id = L.Customer_id
                ';
        if(isset($Customer_id))
        {
                $sql .= " WHERE Customer_id=$Customer_id ";
        }
        echo $sql;
        return $conn->query($sql);
}
			
function Get($id)
{
        $conn = getConnection();
        $result = $conn->query("SELECT * FROM Proj_ContactMethods WHERE Customer_id=$Customer_id");
        $rs = $result->fetch_assoc();
        $conn->close();
        return $rs;
}
?>


<!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Users</title>
    </head>
   
    <body>
                <? include("../inc/tabs.php"); ?>
        <h1>Contact Methods</h1>
        <pre>
                        <? print_r($rs); ?>
        </pre>
        </body>
</html>

